<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>试卷管理</title>
    <#include "/common/link.ftl">

</head>
<body class="hold-transition skin-black sidebar-mini">
<div class="wrapper">
    <#include "/common/navbar.ftl">
    <#assign currentMenu="exam"/>
    <#include "/common/menu.ftl">
    <div class="content-wrapper">
        <section class="content-header">
            <h1>试卷预览</h1>
        </section>
        <section class="content">
            <div class="box" style="padding: 10px">
                <div class="row">

                    <div class="col-md-offset-4 col-md-8">
                        <h1 class="col-md-offset-1">${exam.title}</h1>
                    </div>
                    <div class="col-md-12">
                        <div class="panel panel-default">
                            <div class="panel-body">
                                <div class="col-md-4">时间：${exam.examMinute}分钟</div>
                                <div class="col-md-4">总分：${exam.totalScore}分</div>
                            </div>
                        </div>
                    </div>
                </div>
                <#list enums as e>
                    <div class="panel-heading">
                        <h3>
                            ${e.getName()}(共${exam.getScore(e)}分)
                        </h3>
                    </div>
                    <div class="panel panel-default">
                        <#list questionAndJudgeAnswer as q>

                            <#if e.getValue()==q.type>
                                <div class="panel-body">
                                    <p>${q.sequence}.${q.title}<span>（${q.score}分）</span></p>
                                    <#list choiceAndAnswer as c>
                                        <#if q.id==c.questionId>
                                            <p>${c.title}</p>
                                        </#if>
                                    </#list>
                                    <div style="color:red">正确答案 :
                                        <#if q.type=1 || q.type=2>
                                            <#list choiceAndAnswer as c>
                                                <span style="color:red">
                                        <#if c.getJudgeRight()&&(c.questionId=q.id)>${c.title?substring(0,1)}
                                        </#if>
                                    </span>
                                            </#list>
                                        </#if>
                                        <#if q.type==3>
                                            <span style="color:red">
                                        <#if q.getJudgeRight()&&(q.type==3)>
                                            正确
                                        <#elseif (!q.getJudgeRight())&&(q.type==3)>
                                            错误
                                        </#if>
                                    </span>
                                        </#if>
                                    </div>

                                </div>
                            <#--                <div class="panel-body">-->
                            <#--                    <p>${q.sequence}.${q.title}<span>（${q.score}分）</span></p>-->
                            <#--                    <div style="color:red">正确答案：对</div>-->
                            <#--                </div>-->
                            </#if>
                        </#list>
                    </div>

                </#list>
            </div>
        </section>
    </div>
    <#include "/common/footer.ftl">
</div>
</body>
</html>
